home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 3
/
Info_Mac_1994-01.iso
/
Development
/
General
/
Texx 0.3
/
Profile.exec
< prev
next >
Wrap
Text File
|
1993-11-17
|
2KB
|
90 lines
/* Profile.exec */
say 'Profile.exec';
say 'Date of last change - 11/16/93';
/* List the current Mac operating environment */
/* Check for 32-bit addressing */
if Addr32Bit() then
say 'Running with 32-bit addressing';
else
say 'Running with 24-bit addressing';
/* List the current boot drive */
say 'The boot drive is ' || BootDrive();
/* List the currently mounted volumes */
say 'The following volumes are currently mounted:';
volumes();
do i = 2 to volume.1 + 1
say ' ' || volume.i;
end;
/* List the real memory installed */
say 'The real memory installed is ' || RealMemory();
/* Check for virtual memory */
if VirtualMemory() then
do
say 'Running with Virtual Memory';
say 'The total memory is ' || TotalMemory();
end;
else
say 'Running with real memory only';
/* List the active applications */
say 'The following applications are currently active:';
Processes();
do i = 2 to Process.1 + 1
say ' ' || Process.i;
end;
/* target the finder for external commands */
address finder;
if rc <> 0 then /* Address failed, inform user */
say 'Profile.exec -- Address finder failed';
else
do /* Address successfull */
/* If MS Word temp files exist, move them to the trash */
/* Set up a path to the system folder */
path BootDrive() || 'system folder';
do i = 1 to 4
if FileExists( 'Word Temp ' || i ) then
Move Selection 'Word Temp ' || i 0 0 BootDrive() || 'Trash';
end;
/* now empty the trash */
empty trash;
if rc <> 0 then
say 'Profile.exec -- Empty Trash failed';
/* Now, open the mounted volumes windows */
do i = 2 to volume.1 + 1;
open selection volume.i;
end;
end;
/* add to the exec menu */
path volume.3 || ':texx folder';
addmenu( 'navigator.exec' );
addmenu( 'AppleLink.exec' );
addmenu( 'America Online.exec' );
addmenu( 'Mac Tools.exec' );
addmenu( 'Compact Pro.exec' );
addmenu( 'MPW.exec' );
addmenu( 'ResEdit.exec' );
addmenu( 'Word.exec' );
/* add other commands here */
say 'End of Profile.exec';
exit;
addmenu: /* this routine will add to the Exec menu */
arg menu;
/* if the exec does not exist, an error will be returned */
addexecmenu menu;
if rc <> 0 then
do
say 'Unable to add ' || menu || ' to exec menu';
say 'rc = ' || rc;
end;
return;